<template>
	<div class="posts">
		<slot></slot><!-- 默认插槽 -->
		<slot name="girl"></slot><!-- 具名插槽 -->
		<slot v-for="value in lists" :value="value"></slot>
		<!-- <slot :data="lists"></slot> -->
		<div @click="testProp">测试prop</div>
	</div>
</template>

<script>
	import {
		mapActions,
		mapState,
		mapGetters
	} from 'vuex';
	import {
		fetchList,
		uploadImg
	} from '@/api/match_list'
	export default {
		computed: {
			...mapGetters(['counts']) //使用命名空间要带上对应文件名
		},
		data() {
			return {
				list: null,
				listQuery: {
					page: 1,
					limit: 20
				},
				lists: [1, 2, 3, 4],
			};
		},
		created() {
			// this.getList();
		},
		methods: {
			getList() {
				// this.listLoading = true;
				fetchList(this.listQuery).then(res => {
					console.log(res);
					// this.list = response.data.items;
					// this.total = response.data.total;
					// this.listLoading = false;
				});
			},
			testProp() {
				this.$emit('update:title', 12)
			},
		}
	};
</script>

<style></style>
